package com.tom.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Component;

@Aspect
@Component
@EnableAspectJAutoProxy
public class DefaultAspect {

    @Around("within(com.tom.service..*)")
    public Object log(ProceedingJoinPoint point) throws Throwable {
        System.out.println("注解切入1------");
        Object proceed = point.proceed();
        System.out.println("注解切入2------");
        return proceed;
    }
}
